using System;
using System.Collections.Generic;
using Module.Common.Models;
using Module.Core.DAO;
using Module.Core.EntitiesInfo;


namespace Module.Core.BusinessLogic
{
    public class ProductOrderBL
	{
		/// <summary>
		/// Saves a record to the ProductOrder table.
		/// </summary>
		public static int Insert(ProductOrderInfo productOrderInfo)
		{
			try
			{
				return new ProductOrderDAO().Insert(productOrderInfo);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Saves a record to the ProductOrder table.
		/// </summary>
        public static void Update(ProductOrderInfo productOrderInfo)
		{
			try
			{
				new ProductOrderDAO().Update(productOrderInfo);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Delete a record from the ProductOrder table.
		/// </summary>
        public static void Delete(int orderId)
		{
			try
			{
				new ProductOrderDAO().Delete(orderId);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Selects a single record from the ProductOrder table.
		/// </summary>
        public static ProductOrderInfo Select(int orderId)
		{
			try
			{
				return new ProductOrderDAO().Select(orderId);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Selects all records from the ProductOrder table.
		/// </summary>
        public static CHRTList<ProductOrderInfo> SelectAll()
		{
			try
			{
				return new ProductOrderDAO().SelectAll();
			}
			catch (Exception ex)
			{
				throw;
			}

		}

	}
}
